#ifndef __COMMON_H
#define __COMMON_H

#include <iostream>
#include <string>
#include <sstream>
#include <fstream>
#include <vector>
#include <algorithm>

namespace TimingDiagram
{

    //enumerate available operators
    enum OPERATOR{
        OP_ADD,
        OP_MUL
    };

    typedef std::pair<int,int> DUnit; //pair, first=unit delay, second=execution time
    typedef bool Register; //typedef for a Register

    //Struct for a single instruction, containing it's operator, registers, start cycle, and dependencies
    struct Instruction{
        OPERATOR op;
        int dest, src1, src2;

        int startCycle;
        std::vector<int> dependencies; //List of instructions dependent on this instruction
    };

}

#endif
